package com.zhengxiang.onlinexamination.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhengxiang.onlinexamination.entity.PreviewPaper;
import com.zhengxiang.onlinexamination.entity.Qu;
import com.zhengxiang.onlinexamination.entity.vo.PreviewPaperVo;

import java.util.List;

/**
 * 预考试题记录(PreviewPaper)表服务接口
 *
 * @author makejava
 * @since 2023-03-19 16:34:35
 */
public interface PreviewPaperService extends IService<PreviewPaper> {

    /**
     * 生成待答题内容
     * @param previewPaperVo
     */
    void savePreviewPaper(PreviewPaperVo previewPaperVo);

    /**
     * 打分
     * @param previewPaperVo
     */
    void calculationScore(PreviewPaperVo previewPaperVo);

    /**
     * 正在考试的试卷详情
     */
    PreviewPaperVo queryPaperInfo(PreviewPaperVo ppv);

    /**
     * 题目详情
     * @param ppv
     * @return
     */
    PreviewPaper queryQuInfo(PreviewPaperVo ppv);

    /**
     * 是否存在待考记录
     * */
    boolean checkWaitPaper(Integer userId, Integer waitPaperId);

    /**
     * 获取待考试题
     * */
    List<Qu> queryNeedCheckQuestion(PreviewPaperVo ppv);

}
